package cn.pluss.baselibrary.http;

import java.util.HashMap;

import okhttp3.RequestBody;


public class HttpRequest {

    private HashMap<String,String> mParams;
    private volatile static HttpRequest singleton = null;
    private RequestBody mRequestBody;
    private String mInterfaceName;

    private HttpRequest() {
        mParams = new HashMap<>();
    }

    public static HttpRequest getInstance() {
        if (singleton == null) {
            synchronized (HttpRequest.class) {
                if (singleton == null) {
                    singleton = new HttpRequest();
                }
            }
        }
        return singleton;
    }

    public HttpRequest params(String key, String value) {
        mParams.put(key, value);

        return singleton;
    }

    public HttpRequest interfaceName(String name) {
        mInterfaceName = name;
        return singleton;
    }

    public static PostRequest post(String interfaceName) {
        return new PostRequest(interfaceName);
    }



}
